package com.zone.domain.acticity.service;

import com.zone.domain.acticity.model.entity.ActivityCreatedOrderResponseEntity;
import com.zone.domain.acticity.model.entity.ActivityOrderCreateEntity;
import com.zone.domain.acticity.model.entity.RaffleActivityAccountEntity;

/**
 * @author: zongzi
 * @description: 抽奖活动
 * @date: 2024/6/30
 */
public interface IActivityOrderQuota {

    /**
     * 活动下单，用户额度充值订单，用户活动账户次数充值
     *
     * @param createEntity 入参
     */
    ActivityCreatedOrderResponseEntity doOrder(ActivityOrderCreateEntity createEntity);

    /**
     * 参与用户日抽奖次数（日活动账户次数 - 剩余次数）
     *
     * @param userId     用户id
     * @param activityId 活动id
     * @return
     */
    Integer queryUserDayRaffleCount(String userId, Long activityId);

    /**
     * 查询用户活动账户（如果没有数据返回默认空账户）
     *
     * @param userId 用户id
     * @return
     */
    RaffleActivityAccountEntity queryUserActivityAccount(String userId, Long activityId);
}
